<extend name="Public/base" />
<block name="content">
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a href="{:U('Index/index')}" title="首页" class="tip-bottom"><i
				class="icon-home"></i> 首页</a> <a href="{:U('Oss/index')}" class="tip-bottom">{$meta_title}</a>
	</div>
	<div class="container-fluid">
		<br/>
		<button class="btn btn-info" id="add">新 增</button>
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-content ">
						<table class="table table-bordered table-striped with-check">
							<thead>
								<tr>
									<th>序号</th>
									<th>bucket名称</th>
									<th>权限</th>
									<th>bucket创建时间</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
							<notempty name="_list">
								<volist name="_list" id="vo">
									<tr>
										<td class="taskStatus" style="width:10%;">{$i}</td>
										<td class="taskStatus">{$vo.name}</td>
										<td class="taskStatus">{$vo.acl}</td>
										<td class="taskStatus">{$vo.creat_time|time_format}</td>
										<td class="taskStatus">
											<a href="{:U('Oss/bucketAcl',array('bucket'=>$vo['name']))}" ><i class="icon-cog"></i> 权限</a>
											<a href="{:U('Oss/objectLists',array('bucket'=>$vo['name']))}" ><i class="icon-eye-open"></i> 浏览</a>
									<!-- 		<a href="{:U('Oss/delBucket',array('bucket'=>$vo['name']))}"  class="ajax-get confirm"><i class="icon-remove"></i> 删除</a> -->
										</td>
									</tr>
								</volist>
							<else/>
								<tr>
									<td colspan="4" class="taskStatus"> Oh~亲爱滴,暂时还没有内容! </td>
								</tr>
							</notempty>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$('#add').click(function(){
		window.location.href='{:U("addBucket")}';
	});
	//导航高亮
	highlight_subnav("{:U('Oss/index')}");
	
	//如果bucket数大于等于10 ,则前端做一个限制,不允许创建bucket
	var bucket_num = parseInt("{$bucket_num}");
	if(bucket_num >= 10){
		console.log('123');
		$('#add').attr('disabled',true);
	}
});

</script>
</block>